package com.yoomiito.app.ui.anyview.sureorder

import android.content.Context
import android.text.SpannableString
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.yoomiito.app.model.bean.AddressInfo
import com.yoomiito.app.model.bean.GoodsDetail
import com.yoomiito.app.model.order.CreateOrderData

abstract class BaseSureOrderView(val mContext: Context, val mGoodsDetail: GoodsDetail):LinearLayout(mContext){
    var mAddressInfo: AddressInfo? = null
    lateinit var createOrderData:String//生成订单所需信息
    var mOnShowInfoListener:(spanText:SpannableString,goodsSize:Int,yoMoneyPay:Int)->Unit={_,_,_->}
    var spanText: SpannableString? = null
    var mGoodsTotalPrice: String? = null//总价

    init {
        LayoutInflater.from(context).inflate(getViewId(),this,true)
        initView()
    }

    abstract fun getViewId():Int

    abstract fun initView()

    abstract fun updateAddress(addressInfo: AddressInfo)

    abstract fun orderData(): CreateOrderData
}